using Crm2011.Framework.Core;



namespace Crm2011.Framework.Connect
{
    /// <summary>
    /// Connection Control have to implement this interface 
    /// to be used by the <see cref="CrmConnectionEditor"/>.
    /// </summary>
    /// <seealso cref="LiveIdConnectionControl"/>
    /// <seealso cref="ActiveDirectoryConnectionControl"/>
    public interface ICrmConnectionControl
    {
        /// <summary>
        /// Gets the CRM ConnectionProfile string based on the controls.
        /// </summary>
        /// <returns></returns>
        CrmConnectionString GetCrmConnectionString();



        /// <summary>
        /// Sets the CRM ConnectionProfile string and populates the controls accordingly.
        /// </summary>
        /// <remarks>
        /// When <paramref name="value"/> is <c>null</c> a new <see cref="CrmConnectionString"/>
        /// is used.
        /// </remarks>
        /// <param name="value">The value.</param>
        void SetCrmConnectionString(CrmConnectionString value);
    }
}